package gui.nastaveni;

import gui.skolnikwin.SkolnikWinManager;

import java.awt.Color;
import java.util.ArrayList;
import java.util.List;

import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JPanel;

import model.NastaveniUlohy;
import model.UlohyEnum;

/**
 * Panel v ousku s vyberem uloh pro Matematiku.
 * @author schovjan
 * @date Jan 9, 2012
 */
public class MatematikaNastaveniPanel extends JPanel {

    private static final long serialVersionUID = 1L;
    private JButton btnStart = new JButton("Začít");


    /**
     * Konstruktor
     * @param winManager
     */
    public MatematikaNastaveniPanel(SkolnikWinManager winManager) {
	super();
	createGUI();
    }


    /**
     * Vytvoreni GUI
     */
    private void createGUI() {
	GroupLayout layout = new GroupLayout(this);
	layout.setAutoCreateGaps(true);
	layout.setAutoCreateContainerGaps(true);
	this.setLayout(layout);
	this.setBackground(Color.lightGray);
	// pridani komponent na panel rozcestniku
	layout.setHorizontalGroup(layout.createSequentialGroup().addGroup(
		layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(btnStart)));
	layout.setVerticalGroup(layout.createSequentialGroup().addGroup(
		layout.createSequentialGroup().addComponent(btnStart)));
    }


    /**
     * Vrati zadani pro ulohu matematika
     * @return
     */
    public NastaveniUlohy getNastaveniUlohy() {
	NastaveniUlohy nastaveni = new NastaveniUlohy();
	List<UlohyEnum> zadani = new ArrayList<UlohyEnum>();
	// if (chbIy.isSelected()) zadani.add(UlohyEnum.iIyY);
	// if (chbU.isSelected()) zadani.add(UlohyEnum.uU);
	// nastaveni.setPocetDiluObrazku(this.slRozdeleni.getValue());
	nastaveni.setZadani(zadani);
	return nastaveni;
    }
}
